From 456322dde6682c679c377b157c77ded178367586 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 10 Dec 2022 20:54:45 -0500 Subject: video_core: fix off by one in anisotropic filtering amount --- src/video_core/textures/texture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index b8327c88a..26649aebf 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp @@ -64,10 +64,11 @@ float TSCEntry::MaxAnisotropy() const noexcept { return 1.0f; } const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue(); - u32 added_anisotropic{}; + s32 added_anisotropic{}; if (anisotropic_settings == 0) { added_anisotropic = Settings::values.resolution_info.up_scale >> Settings::values.resolution_info.down_shift; + added_anisotropic = std::max(added_anisotropic - 1, 0); } else { added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U; } -- cgit v1.2.3